﻿using AllServer.Core;
using AllServer.Core.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AllServer.Account.Application.Services;

public interface IMemberService
{
    Task<TMember> GetMember(string userCode);
}

public class TMemberService : SqlSugarRepository<TMember>, IMemberService, ITransient
{
    public async Task<TMember> GetMember(string userCode)
    {
        return await Context.Queryable<TMember>()
            .Where(m => m.UserCode == userCode)
            .FirstAsync();
    }
}